package main

import (
	"fmt"
	"goPlay/logical"
	"strings"
)

func main() {
	// str := "1+236-1/(2+1)"
	str := "1+(236-1)/2+1"
	// str := "1+2÷3×6"
	// content := "1+2=10"
	content := "(1+236-1)/2+1=1"
	index := strings.Index(content, "=")
	answerData := content[:index]
	calData := content[index+1:]
	fmt.Println("answerData:", answerData)
	fmt.Println("answerData:", calData)
	fmt.Println(str)
	// fmt.Println(Count(str))
	a := dealContent("1+×11÷")
	fmt.Println(a)
	// fmt.Println(logical.GetAnswer("1+×11÷=81"))
	fmt.Println(logical.Count("(1+2)*3/4-2/4*3"))

}

/*
算式规整化
*/
func dealContent(content string) (result string) {
	result = content
	result = strings.Replace(result, "÷", "/", -1)
	result = strings.Replace(result, "×", "*", -1)
	return
}
